
<template>
    <view>
        <view>
            <view class="page_top2" :style="{
        background: topNav ? 'white' : 'white',
        'z-index': 199,
      }">
                <top-status></top-status>
                <view class="tabsBack">
                <view @click="goBack()" class="blackbox">
                    <uni-icons :color="topNav ? 'black' : 'black'" type="left" size="30"></uni-icons>
                </view>
                </view>
            </view>
        </view>
        <video class="videobox" :id="'video'+index" :direction="0" :src="src" :poster="src +'?x-oss-process=video/snapshot,t_1,m_fast,ar_auto'">
        </video>
    </view>
</template>
<script>
import topStatus from "@/components/topStatus/topStatus.vue";
	export default {
         components: {
            topStatus,
        },
		data() {
			return {
                src:'',
                topNav:false,
                index:0,
			}
		},
		onLoad(e) {
            this.src = e.src
		},
        methods:{
            goBack() {
                const pages = getCurrentPages();
                if (pages.length > 1) {
                    // 如果页面栈长度大于1，则说明有上一页，可以返回
                    uni.navigateBack();
                } else {
                    // 如果没有上一页，则导航到首页
                    uni.reLaunch({
                    url: '/pages/tab/home'
                    });
                }
            },
        }
	}
</script>
<style lang="scss">
page{
    background-color: #000000;
}
.videobox{
    width: 100%;
    height: 90vh;
    margin-top: 160rpx;
}
.page_top2 {
  position: fixed;
  top: 0;
  left: 0;
  width: 750rpx;
  box-sizing: border-box;
  transition: 0.3s all;
  z-index: -1;

  .tabsBack {
    height: 44px;
    padding-left: 32rpx;
    display: flex;
    align-items: center;
    z-index: 999;

    .topTitle {
      padding-left: 20rpx;
      font-weight: bold;
      font-size: 36rpx;
      color: #333333;
      width: 300rpx;
    }

    .blackbox {
      width: 52rpx;
      height: 52rpx;
      display: flex;
      align-items: center;
    }

    image {
      width: 24rpx;
      height: 36rpx;
      display: block;
    }
  }
}
</style>